package com.wx.service;


import com.wx.common.SecurityUser;
import com.wx.domain.dto.*;
import com.wx.entity.SysUser;

import java.util.List;

/**
 * <p>Title:	  UserService <br/> </p>
 * <p>Description 用户service <br/> </p>
 * <p>Company:    医百科技有限公司  <br/> </p>
 *
 * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>  <br/>
 * @Date 2017 /5/15 13:49
 */
public interface SysUserService extends BaseService<SysUser> {

	/**
	 * <p>Title:	  selectUserByUserName. </p>
	 * <p>Description 根据用户名查询用户</p>
	 *
	 * @param username the username
	 * @return User user
	 * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
	 * @CreateDate 2017 /6/10 14:16
	 */
	SysUser selectUserByUserName(String username);

	/**
	 * <p>Title:      getAuthUserInfo. </p>
	 * <p>Description 获取认证后的用户信息</p>
	 *
	 *
	 * @param loginName the login name
	 * @return auth user info
	 * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
	 * @since 2018 /2/8 14:43
	 */
	AuthUserDto getAuthUserInfo(String loginName);

	/**
	 * <p>Title:      分页查询用户信息. </p>
	 * <p>Description </p>
	 *
	 * @param param the param
	 * @return page info
	 * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
	 * @since 2018 /2/9 12:09
	 */
	List<SysUser> queryListPage(SysUser param);

	/**
	 * <p>Title:      deleteUserById. </p>
	 * <p>Description 根据id删除用户信息</p>
	 *
	 * @param id          the id
	 * @param authUserDto the auth user dto
	 * @return int int
	 * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
	 * @since 2018 /2/20 14:15
	 */
	int deleteUserById(String id, SecurityUser authUserDto);

	/**
	 * <p>Title:      disableUserById. </p>
	 * <p>Description 禁用用户</p>
	 *
	 * @param id          the id
	 * @param authUserDto the auth user dto
	 * @return int int
	 * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
	 * @since 2018 /2/20 14:32
	 */
	int disableUserById(String id, SecurityUser authUserDto);

	/**
	 * <p>Title:      enableUserById. </p>
	 * <p>Description 启用用户</p>
	 *
	 * @param id          the id
	 * @param authUserDto the auth user dto
	 * @return int int
	 * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
	 * @since 2018 /2/20 14:32
	 */
	int enableUserById(String id, SecurityUser authUserDto);

	/**
	 * <p>Title:      modifyUser. </p>
	 * <p>Description 修改用户信息</p>
	 *
	 * @param securityUser SecurityUser
	 * @return int int
	 * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
	 * @since 2018 /2/20 15:38
	 */
	int modifyUser(SysUser user, SecurityUser securityUser);

	/**
	 * <p>Title:      saveUserInfo. </p>
	 * <p>Description 保存用户信息</p>
	 *
	 * @param user        the user
	 * @param securityUser
     * @return int int
	 * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
	 * @since 2018 /2/22 17:25
	 */
	int saveUserInfo(SysUser user, SecurityUser securityUser);

	/**
	 * <p>Title:      modifyPassword. </p>
	 * <p>Description 修改密码</p>
	 *
	 * @param user SysUser
	 * @param authUserDto
	 * @return Wrapper
	 * @Author <a href="xinglinglove1029@163.com"/>杨文生</a>
	 * @since 2019/4/11 17:23
	 */
	int modifyPassword(UpdatePwdDto user, SecurityUser authUserDto);

	int resetPassword(UpdatePwdDto user, SecurityUser securityUser);
}
